package cn.virens.web.components.shiro.oauth2;

import org.apache.shiro.authc.AuthenticationInfo;

public class Oauth2AuthenticationInfo implements AuthenticationInfo {
	private static final long serialVersionUID = 7765186276295447808L;

	private Oauth2PrincipalCollection principals;

	public Oauth2AuthenticationInfo(Oauth2PrincipalCollection principals) {
		this.principals = principals;
	}

	@Override
	public Oauth2PrincipalCollection getPrincipals() {
		return principals;
	}

	@Override
	public Object getCredentials() {
		return principals.getAccessToken();
	}
}
